package cn.tuling.controller;

import cn.tuling.entity.Student;
import cn.tuling.entity.User;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class JsonController {

    @PostMapping("/user")
    public User getUser(@RequestBody User user) {
        int i = 1 / 0;
        return user;
    }

    @PostMapping("/student")
    public Student getStudent(@RequestBody Student student) {
        return student;
    }
}
